<table id="datagrid_${action_id}"></table>
<div id="datagrid_tb_${action_id}" style="padding:5px;height:auto">
	${action.getDatagridTitle('name')}:
	<input class="easyui-validatebox" style="width: 200px;" name="_searcher_lky_name" >
	&nbsp;&nbsp;&nbsp;&nbsp;
	<a href="javascript:;;" onclick="javascript:$('#datagrid_tb_${action_id}').searcher('doSearch')" class="easyui-linkbutton" iconCls="icon-search">查询</a>
</div>
<script type="text/javascript">

$(function() {
	
	$('#datagrid_tb_${action_id}').searcher({
		doSearch:function(qp){
			$('#datagrid_${action_id}').datagrid('options').queryParams = qp;
			$('#datagrid_${action_id}').datagrid('reload');
		}
	});
	
	$('#datagrid_${action_id}').datagrid({
	iconCls:'icon-save',
	width:'auto',
	height:'auto',
	nowrap: false,
	fit:true,
	singleSelect:true,
	fitColumns:true,
	striped: true,
	sortName: 'id',
	sortOrder: 'desc',
	url:'${request.contextPath}${namespace?default('')}/mp/product/type-datagrid.json',
	remoteSort: true,
	idField:'id',
	onBeforeLoad:function(){$('#datagrid_${action_id}').datagrid('unselectAll');},
	columns:[[
				{title:'${action.getDatagridTitle('name')}',field:'name',width:100,align:'center'},
				{title:'${action.getDatagridTitle('subName')}',field:'subName',width:100,align:'center'}
			]],
	pagination:true,
	rownumbers:true,
	toolbar:'#datagrid_tb_${action_id}',
	onDblClickRow:function(idx,data){if(typeof onDblClickRow_${action_id} != 'undefined'){onDblClickRow_${action_id}(idx,data)}},
	onClickRow:function(idx,data){if(typeof onClickRow_${action_id} != 'undefined'){onClickRow_${action_id}(idx,data)}},
	onRowContextMenu:function(e,idx,data){if(typeof onRowContextMenu_${action_id} != 'undefined'){$(this).datagrid('selectRow', idx);onRowContextMenu_${action_id}(e,idx,data)}}
});

});

</script>
